<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>123456</p>
    <script>
    
      function setStyle(a) {
        let head = document.getElementsByTagName('head')[0]
        let style = document.createElement('link')
        style.rel = 'stylesheet'
        style.type = 'text/css'
        a > 10 ? style.href = './1.css' : style.href = './2.css'
        head.appendChild(style)
      }
      setStyle(1)
    
    </script>
</body>
</html>